# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=chatty
pkgver=0.1.14
pkgrel=1
pkgdesc="A phone dialer and call handler"
arch="all !s390x !mips !mips64" # Blocked by libhandy and evolution
url="https://gitlab.gnome.org/Community/Purism/chatty"
license="GPL-3.0-or-later"
depends="libpurple-xmpp purple-mm-sms"
makedepends="meson ninja gtk+3.0-dev pidgin-dev libhandy-dev evolution-dev
	evolution-data-server-dev libgee-dev folks-dev feedbackd-dev"
checkdepends="appstream-glib desktop-file-utils"
source="https://source.puri.sm/Librem5/chatty/-/archive/v$pkgver/chatty-v$pkgver.tar.gz"
subpackages="$pkgname-lang $pkgname-bash-completion"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}
sha512sums="45153407485433d81624e087ed436e58343402cb0c40e2b6ca88b1a1ef17fd3ce84d543d56c7a37c19e881626aaff3cb7f17d674f859803ceaf4487860a41c95  chatty-v0.1.14.tar.gz"
